﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Database.Model.Customers>" %>
<%@ Import Namespace="CRM.Resourses" %>


<% Html.DevExpress().GridView(settings =>
                                    {
                                        settings.Name = "gdAgreementElements";
                                        settings.KeyFieldName = "IdAgreementElement";
                                        settings.CallbackRouteValues =
                                            new { Controller = "Customers", Action = "AgreementElements", customerId = Model.IdCustomer };
                                        settings.SettingsPager.PageSize = 20;
                                        settings.Settings.ShowFilterBar = GridViewStatusBarMode.Hidden;

                                        settings.Columns.Add(column=>
                                                                 {
                                                                     column.FieldName = "LegalEntityName";
                                                                     column.Caption = Resourses.LegalEntityName;
                                                                 });
                                        //settings.Columns.Add(column=>
                                        //                         {
                                        //                             column.FieldName = "OwnershipPatternShortName";
                                        //                             column.Caption =
                                        //                                 Resourses.OwnershipPattern;
                                        //                         });
                                        //settings.Columns.Add(column =>
                                        //{
                                        //    column.FieldName = "FullName";
                                        //    column.Caption = Resourses.Name;
                                        //});
                                        settings.Columns.Add(column=>
                                                                 {
                                                                     column.FieldName = "FIOGenDirInRP";
                                                                     column.Caption = Resourses.FIOGenDirInRP;
                                                                 });
                                        settings.Columns.Add(column=>
                                                                 {
                                                                     column.FieldName = "FIOGenDir";
                                                                     column.Caption = Resourses.FIOGenDir;
                                                                 });

                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "FIOGenDirInRPShort";
                                            column.Caption = Resourses.FIOGenDirShortInRp;
                                        });
                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "FIOGenDirShort";
                                            column.Caption = Resourses.FIOGenDirShort;
                                        });
                                        
                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "PostIndex";
                                            column.Caption = Resourses.PostIndex;
                                        });
                                       
                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "FullAddress";
                                            column.Caption = Resourses.FullAddress;
                                        });
                                       
                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "INN";
                                            column.Caption = Resourses.INN;
                                        });
                                       
                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "KPP";
                                            column.Caption = Resourses.KPP;
                                        });
                                       
                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "RS";
                                            column.Caption = Resourses.RS;
                                        });
                                       
                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "KS";
                                            column.Caption = Resourses.KS;
                                        });
                                       
                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "BIK";
                                            column.Caption = Resourses.BIK;
                                        });
                                       
                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "Bank";
                                            column.Caption = Resourses.Bank;
                                        });
                                        
                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "OGRN";
                                            column.Caption = Resourses.OGRN;
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.FieldName = "OKPO";
                                            column.Caption = Resourses.OKPO;
                                        });
                                        
                                        settings.Columns.Add(column =>
                                                                 {
                                                                     column.FieldName = "IsActive";
                                                                     column.Caption = Resourses.IsActive;
                                                                     column.ColumnType = MVCxGridViewColumnType.CheckBox;
                                                                 });
                                       
                                        

                                        //конец комбобокса
                                    })
       .Bind(Model.AgreementElements).GetHtml();%>

